package hah;

import JVM.Single;

public class Singleton {
    private static final Singleton singleton=new Singleton();

    private Singleton(){
    }

    public static Singleton getSingleton(){
        return singleton;
    }

    //test
    public static void main(String[] args) {
        Singleton singleton1 = Singleton.getSingleton();
        Singleton singleton2 = Singleton.getSingleton();
        System.out.println(singleton1==singleton2);
    }
}
